package cn.mcsys.viewer.core.web;

import cn.mcsys.myadmin.dubbo.service.BackService;
import cn.mcsys.myadmin.modules.air.entity.AirCar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("viewer")
public class TestUserController {

    @Autowired private BackService backService;

    @RequestMapping("hello")
    @ResponseBody
    public String hello(){
        return backService.sayHi();
    }

//    @RequestMapping("cars")
//    @ResponseBody
//    public List<AirCar> getCar(){
//        List<AirCar> cars = backService.selectByPointId();
//        return cars;
//    }

    @RequestMapping("getAllCars")
    @ResponseBody
    public List<AirCar> cars(){
        return backService.getAllCarList();
    }



}
